<?php
class router_public
{
 //IF USED FOR ALL PUBLIC PAGES.ADD SHORT TAGS ON THE HEADER VIEW FILES META TAGS.//
 //COPY THIS FILE TO CREATE MORE ADDED MODULES. PROTECTED(USERS),PRIVATE(ADMIN) ETC.//
 //var $meta_title='SITE-NAME';//if used for all pages PASS VARS TO HEADER VIEWS//
 //var $meta_discription='A site for fun.';//if used for all pages PASS VARS TO HEADER VIEWS//
 //ALL CONTROLLER(CLASSES AND FUNCTIONS ARE AUTOMATICALLY INCLUDED WHEN STAGED ABOVE THEIR NEEDED VIEWS//

 function routePublic()
 {
  include('a1/config.php');//FOR MODULE 1 PUBLIC CONFIG FILE INCLUSION//

  if(isset($_GET['page']))
  {
   $page = htmlspecialchars($_GET["page"]);
  //public router includes c1/controllers above views-parts where needed.//
  //module 1//PLACE UNSET GLOBALS CONDITION ON PREG-MATCH FAIL ON PAGE NAMES HERE///
  ///.htaccess is not advised by Php or Apache.///
  ///Advised to write GLOBAL( _REQUEST, _POST, AND_GET UNSET CONDITIONS. ) SEE APACHE MANUAL.2013 ///
    if($page == 'home')
    {
   // $title='Home';//$this->meta_title;
  //  $metadiscript='A cool site.';//$this->meta_discription;
    include('v1/a1.php');
    include('v1/b1.php');
    include('v1/c1.php');
    include('v1/dhome.php');
    include('v1/e1.php');
    include('v1/f1.php');
    }
  if($page == 'about')
    {
   // $title='About';
   // $metadiscription='A cool site.';
    include('v1/a1.php');
    include('v1/b1.php');
    include('v1/c1.php');
    include('v1/dabout.php');
    include('v1/e1.php');
    include('v1/f1.php');
    }
  if($page == 'policy')
    {
   // $title='Policy';
   // $metadiscription='A cool site.';
    include('v1/a1.php');
    include('v1/b1.php');
    include('v1/c1.php');
   // include('../c1/class_contact.php');//we auto include controller//
    include('v1/dpolicy.php');
    include('v1/e1.php');
    include('v1/f1.php');
    }
    if($page == 'signup')
    {
   // $title='Signup';
   // $metadiscription='A cool site.';
    include('v1/a1.php');
    include('v1/b1.php');
    include('v1/c1.php');
    include('c1/signup.php');//we auto include controller//
    include('v1/dsignup.php');
    include('v1/e1.php');
    include('v1/f1.php');
    }
    if($page == 'example')
    {
   // $title='Example';
   // $metadiscription='A cool site.';
    include('v1/a1.php');
    include('v1/b1.php');
    include('v1/c1.php');
    include('c1/percent.php');//we auto include controller//
    include('v1/dexample.php');
    include('v1/e1.php');
    include('v1/f1.php');
    }
    if($page == 'login')
    {
   // $title='Example';
   // $metadiscription='A cool site.';
    //include('../v1/a1.php');
    ///include('../v1/b1.php');
    //include('../v1/c1.php');
    //include('../c1/logger.php');//we auto include controller//
    include('v1/dlogin.php');
    include('v1/e1.php');
    include('v1/f1.php');
    }
  //ADD MORE PAGES HERE//

  }else{
  //OUR DEFAULT PAGE OR STATIC PAGE CAN BE PLACED HERE,,OR YOU CAN ADD AN ENTIRE STATIC PAGE HERE//
  //$title='Home';
   // $metadiscription='A cool site.';
    include('v1/a1.php');
    include('v1/b1.php');
    include('v1/c1.php');
    include('v1/dhome.php');
    include('v1/e1.php');
    include('v1/f1.php');

  }//end if set

 }//end function

};//end class
//TO CALL THIS CLASS ON the main INDEX.PHP. CONFIG IS AUTOMATICALLY INCLUDED.//
//$public = new router_public;
//$public->routePublic();
?>